home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 11 Learning / 04 Mommersteeg / Tennis / PatternBot.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-30  |  1.4 KB  |  44 lines

  1. //----------------------------------------------------------------------------------------------
  2. // Sequential Prediction Demo: The positioning pattern
  3. // 
  4. // Author:  Fri Mommersteeg
  5. // Date:    10-09-2001
  6. // File:    PatternBot.h
  7. //----------------------------------------------------------------------------------------------
  8.  
  9. #ifndef __PATTERNBOT_H
  10. #define __PATTERNBOT_H
  11.  
  12. //----------------------------------------------------------------------------------------------
  13. // Include files
  14. //----------------------------------------------------------------------------------------------
  15.  
  16. #include "aibot.h"
  17. #include "array.h"
  18.  
  19. //----------------------------------------------------------------------------------------------
  20. // CPatternBot: An AI-controlled bot that can generate patterns in where it plays the ball to
  21. //----------------------------------------------------------------------------------------------
  22.  
  23. class CPatternBot : public CAiBot {
  24. public:
  25.  
  26.     void                SetPatternSize(int nSize);
  27.     int                 GetPatternSize();
  28.  
  29. protected:
  30.     
  31.     virtual void        ShowStatistics(HDC dc) { /* do not show statistics */ }
  32.     virtual void        OnBallCollision();
  33.     virtual void        ResetForService(BOOL HasService);
  34.  
  35. protected:
  36.  
  37.     CArray <int>        m_Pattern;
  38.     int                    m_PatternPos;
  39.  
  40. };
  41.  
  42. //----------------------------------------------------------------------------------------------
  43. #endif // __PATTERNBOT_H
  44.